﻿using System;
using System.Collections.Generic;
using System.Text;
using NUnit.Framework;

namespace TSVNAddinUtils.Test
{
	[TestFixture]
	public class UtilsCommandProviderFixture
	{
		[Test]
		public void GetCommand()
		{
			string[] args = new string[]{
					"/Unregister"
				};
			UtilsCommandProvider commandProvider = new UtilsCommandProvider();
			IUtilsCommand command = commandProvider.GetCommand(args);

			Assert.IsInstanceOf(typeof(IUtilsCommand), command);
		}

		[Test]
		public void GetCommandWithNotRecognizedCommand()
		{
			string[] args = new string[]{
					"/Ciccio"
				};
			UtilsCommandProvider commandProvider = new UtilsCommandProvider();
			IUtilsCommand command = commandProvider.GetCommand(args);

			Assert.IsInstanceOf(typeof(HelpCommand), command);
		}

		[Test]
		public void GetCommandWithoutCommand()
		{
			string[] args = new string[0];
			UtilsCommandProvider commandProvider = new UtilsCommandProvider();
			IUtilsCommand command = commandProvider.GetCommand(args);

			Assert.IsInstanceOf(typeof(HelpCommand), command);
		}
	}
}
